package file.day9_22;

public class SleepDemo {
    public static void main(String[] args) {
        Thread lin = new Thread(){
            public void run(){
                System.out.println("准备睡觉");

                try {
                    Thread.sleep(100000);
                } catch (InterruptedException e) {
                    System.out.println("你干嘛啊");
                }

                System.out.println("醒了");
            }
        };

        Thread ming = new Thread(){
            public void run(){
                System.out.println("开始砸墙");

                for (int i = 0; i < 4; i++) {
                    System.out.println("80");

                    try {
                        Thread.sleep(1000);
                    } catch (InterruptedException e) {
//                        e.printStackTrace();
                    }
                }

                System.out.println("砸完收工");

                lin.interrupt();
            }
        };

        lin.start();
        ming.start();

    }
}
